<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #c9c9c9;
        }

        #pic-toggle {
            position: relative;
            margin: 300px auto;
            background-color: #fff;
            width: 1000px;
            height: 500px;
        }

        #pic-toggle span {
            float: left;
            display: block;
            position: relative;
            height: 100px;
            width: 60px;
            background-color: #706a63;
            color: #fff;
            font-size: 40px;
            text-align: center;
            line-height: 100px;
            cursor: pointer;
        }

        #pic-toggle #left {
            top: 50%;
            left: 0;
            transform: translateY(-50%);
        }

        #pic-toggle #right {
            top: 50%;
            left: 100%;
            transform: translateY(-50%) translateX(-200%);
        }

    </style>
    <script src="vue.js"></script>
</head>

<body>

    <div id="pic-toggle">
        <span id="left" @click="pre" v-show="index>0">&lt;</span>
        <img :src="imgSrc[index]" />
        <span id="right" @click="next" v-show="index<imgSrc.length-1">&gt;</span>
    </div>

    <script>

        var vue = new Vue({
            el: "#pic-toggle",
            data: {
                imgSrc: [
                    "./LOL原画/卡莎 KDA.jpg",
                    "./LOL原画/腥红之月伊芙琳.jpg",
                    "./LOL原画/vn.jpg"
                ],
                index: 0
            },
            methods: {
                next: function(e) {
                    if(this.index<this.imgSrc.length-1) this.index++;
                },
                pre: function(e) {
                    if(this.index>0) this.index--;
                }
            }
        });

    </script>

</body>
</html>